export default defineEventHandler(async (event) => {
  const id = getRouterParam(event, 'id')
  const method = event.method
  
  if (method === 'DELETE') {
    // 模拟删除收藏
    console.log(`删除收藏: ${id}`)
    
    return {
      code: 200,
      message: '取消收藏成功',
      data: {
        id,
      },
    }
  }
  
  throw createError({
    statusCode: 405,
    message: 'Method Not Allowed',
  })
})

